<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="Probably the most complete UI kit out there. Multiple functionalities and controls added,  extended color palette and beautiful typography, designed as its own extended version of Bootstrap at  the highest level of quality.                             ">
    <meta name="author" content="Webpixels">
    <title>评测系统</title>
    <!-- Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Nunito:400,600,700,800|Roboto:400,500,700" rel="stylesheet">
    <!-- Theme CSS -->
    <link type="text/css" th:href="@{/css/theme.css}" rel="stylesheet">
</head>
<body>
    <div th:fragment="header">
        <nav class="navbar navbar-expand-lg navbar-dark bg-dark py-2">
            <div class="container">
                <a class="navbar-brand" href="./" style="font-size: 30px;margin-left: -150px"><strong>T J A 增 值 评 测 系 统</strong> </a>
                <button class="navbar-toggler" type="button" data-action="offcanvas-open" data-target="#navbar_main" aria-controls="navbar_main" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="navbar-collapse offcanvas-collapse" id="navbar_main">
                    <ul class="navbar-nav ml-auto align-items-lg-center">
                        <h6 class="dropdown-header font-weight-600 d-lg-none px-0">菜单</h6>
                        <li class="nav-item">
                            <a class="nav-link" th:href="${#servletContext.contextPath} + '/index'">首页</a>
                        </li>
                        <li th:if="${session.target != null}" class="nav-item">
                            <a class="nav-link" th:text="${session.roleName == 'teacher'?session.target.esTeacherName+' (教师)' : session.target.esStudentName+' (学生)'}"></a>
                        </li>
                        <li class="nav-item active">
                            <a class="nav-link" th:href="${#servletContext.contextPath} + '/index'">评价表</a>
                        </li>
                        <li th:if="${session.target != null && session.roleName == 'teacher'}" class="nav-item">
                            <a class="nav-link" th:href="${#servletContext.contextPath} + '/comprehensive-charts'">图表数据</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" th:href="${#servletContext.contextPath} + '/pre-result'">前测评价结果</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" th:if="${session.target!=null}" th:href="${#servletContext.contextPath} + '/logout'">退出登录</a>
                            <a class="nav-link" th:if="${session.target==null}" th:href="${#servletContext.contextPath} + '/login'">登录</a>
                        </li>
                        <li th:if="${session.roleName == 'teacher'}" class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" href="#" id="navbar_main_dropdown_1" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">管理</a>
                            <div class="dropdown-menu" aria-labelledby="navbar_1_dropdown_1">
                                <a class="dropdown-item" th:href="${#servletContext.contextPath} + '/manageClass'">班级管理</a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </div>
</body>
</html>
